<%@page import="com.alibaba.dubbo.demo.bean.DevDevinfo"%>
<%@page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="java.util.List,java.util.ArrayList"%>
<%@page import="com.alibaba.dubbo.demo.bean.SysBackuppolicy"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<div class="pageContent">  
<%
		SysBackuppolicy backuppolicy = new SysBackuppolicy();
		String action = "edit";
		if(request.getParameter("action")!=null)
			action = request.getParameter("action");
		String option = "./saveBackupPolicy";
		String deptName = "";
		if(action.equals("edit")) 
		{
			if (request.getSession().getAttribute("sysBackuppolicy") != null) 
			{
				backuppolicy = (SysBackuppolicy) request.getSession().getAttribute("sysBackuppolicy");
			}
			option = "./updatesBackupPolicy";
		}
%> 	
	<form method="post" action="<%=option%>" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
		<div class="pageFormContent" layoutH="56">
			<p>
				<label>备份类型:</label>
				<input name="mainid" type="hidden" value="<%=backuppolicy.getMainid()%>" readonly="readonly" />
				<select class="required combox" name="backuptype" style="width:100px" size="30" >
						<option value="0" >每天</option> 
						<option value="1" >每周一</option>
						<option value="2" >每月1日</option>
						<option value="3" >实时(一次性)</option>
				</select>
			</p>
			<p>
				<label>计划备份时间：</label>
				<input type="text" name="backuptime" class="date"  size="30" dateFmt="HH:mm:ss" mmStep="15" readonly="true" value="<%=backuppolicy.getBackuptime()%>"/>
				<a class="inputDateButton" href="javascript:;">选择</a>
			</p>
			<p>
				<label>备注：</label>
				<input name="remark" type="text" size="30" value="<%=backuppolicy.getRemark()%>" />
			</p>
			<p>
				<label>执行时间：</label>
				<input name="lasttime" type="text" size="30" value="<%=backuppolicy.getLasttime()%>"  readonly="true"   alt="执行后自动填写" />
			</p>								
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
<script language="JavaScript">
	$(function(){
		var sum = 0;
		$("input[type=text]").each(function(i){
		    var text = $(this).val();
		    if(text =="null"){
		       $(this).val("")
		    }
		});
		$(".combox").val("<%=backuppolicy.getBackuptype()%>");
	});
	console.info('<%=action%>');
</script>
</div>
